ContentType

interface ContentType

A parsed Content-Type header value.

Since

7.33

Types

Link copied to clipboard
class Builder
A builder of ContentType.

Functions

Link copied to clipboard
open fun boundary(): Optional<String>
Returns the boundary specified in the Content-Type header or an empty Optional if the header does not contain a boundary.
Link copied to clipboard
open fun charset(): Optional<String>
Returns the charset specified in the Content-Type header or an empty Optional if the header does not contain a charset.
Link copied to clipboard
open fun mediaType(): String
Returns the media type (the MIME type) specified in the Content-Type header.
Link copied to clipboard
open fun newBuilder(mediaType: String): ContentType.Builder
Create a new ContentType builder.